package com.ruoyi.match.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.match.mapper.MatchEvaluationMapper;
import com.ruoyi.match.domain.MatchEvaluation;
import com.ruoyi.match.service.IMatchEvaluationService;
import com.ruoyi.common.core.text.Convert;

/**
 * 评价Service业务层处理
 * 
 * @author 星野漫游
 * @date 2024-06-02
 */
@Service
public class MatchEvaluationServiceImpl implements IMatchEvaluationService 
{
    @Autowired
    private MatchEvaluationMapper matchEvaluationMapper;

    /**
     * 查询评价
     * 
     * @param evaluationId 评价主键
     * @return 评价
     */
    @Override
    public MatchEvaluation selectMatchEvaluationByEvaluationId(Long evaluationId)
    {
        return matchEvaluationMapper.selectMatchEvaluationByEvaluationId(evaluationId);
    }

    /**
     * 查询评价列表
     * 
     * @param matchEvaluation 评价
     * @return 评价
     */
    @Override
    public List<MatchEvaluation> selectMatchEvaluationList(MatchEvaluation matchEvaluation)
    {
        return matchEvaluationMapper.selectMatchEvaluationList(matchEvaluation);
    }

    /**
     * 新增评价
     * 
     * @param matchEvaluation 评价
     * @return 结果
     */
    @Override
    public int insertMatchEvaluation(MatchEvaluation matchEvaluation)
    {
        return matchEvaluationMapper.insertMatchEvaluation(matchEvaluation);
    }

    /**
     * 修改评价
     * 
     * @param matchEvaluation 评价
     * @return 结果
     */
    @Override
    public int updateMatchEvaluation(MatchEvaluation matchEvaluation)
    {
        return matchEvaluationMapper.updateMatchEvaluation(matchEvaluation);
    }

    /**
     * 批量删除评价
     * 
     * @param evaluationIds 需要删除的评价主键
     * @return 结果
     */
    @Override
    public int deleteMatchEvaluationByEvaluationIds(String evaluationIds)
    {
        return matchEvaluationMapper.deleteMatchEvaluationByEvaluationIds(Convert.toStrArray(evaluationIds));
    }

    /**
     * 删除评价信息
     * 
     * @param evaluationId 评价主键
     * @return 结果
     */
    @Override
    public int deleteMatchEvaluationByEvaluationId(Long evaluationId)
    {
        return matchEvaluationMapper.deleteMatchEvaluationByEvaluationId(evaluationId);
    }
}
